<?php
/**
 ***********************************************************************************************************************
 * @author llq  2015/5/14  15:34
 ***********************************************************************************************************************
 */
namespace soa\message;
use soa\client;

/**
 * Class mail
 */
class mail extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://message.core.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_message';

    /**
     * @param $courier_id
     * @return bool|null
     */
    public function send($title, $content, $mail_to)
    {
        if(empty($title) || !is_string($title) || empty($content) || !is_string($content) || empty($mail_to) || !is_string($mail_to)) {
            return false;
        }
        return $this->get('v1/mail/add', array(
            'title' => $title,
            'content' => $content,
            'mail_to' => $mail_to
        ));
    }

}